<!DOCTYPE html>
<html>
 <head>
  <meta charset="utf-8" />
  <title>欢迎注册</title>
  <style media="screen">
      .form{
        position:absolute;
        top:220px;
        right:350px;
        width:500px;
        height:500px;
      }
  </style>
  <link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous" />
  <script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
 </head>
 <body>
  <div class="row">
   <div class="col-xs-6 col-md-1"></div>
   <div class="col-xs-6 col-md-10">
    <div class="">
     <img src="/imgs/guazi.png" width="400px" height="150px" alt="" />
    </div>

    <div class="form">

     <form class="form-horizontal" method="post" action="" >
        {!! csrf_field()!!}
      <div class="form-group">
       <label for="username" class="col-sm-3 control-label">用户名:</label>
       <div class="col-sm-9">
        <input type="text" name="username" class="form-control" id="username" placeholder="用户名必须6~10位" />
        @if($errors->has('username'))
        <p style="color:red">{{$errors->first('username')}}</p>
        @endif
       </div>
      </div>

      <div class="form-group">
       <label for="password" class="col-sm-3 control-label">密码:</label>
       <div class="col-sm-9">
        <input type="password" name="password" class="form-control"  placeholder="密码必须6位以上" />
         @if($errors->has('password'))
        <p style="color:red">{{$errors->first('password')}}</p>
        @endif
       </div>
      </div>

      <div class="form-group">
       <label for="password" class="col-sm-3 control-label">确认密码:</label>
       <div class="col-sm-9">
        <input type="password" name="password_confirmation" class="form-control"   placeholder="确认密码" />
       </div>
      </div>

      <div class="form-group">
       <label for="email" class="col-sm-3 control-label">邮箱:</label>
       <div class="col-sm-9">
        <input type="email" name="email" class="form-control" id="email" placeholder="" />
         @if($errors->has('email'))
        <p style="color:red">{{$errors->first('email')}}</p>
        @endif
       </div>
      </div>
      <div class="form-group">
       <label for="mobile" class="col-sm-3 control-label">手机号:</label>
       <div class="col-sm-9">
        <input type="text" name="mobile" class="form-control" id="mobile" placeholder="手机号必须为11位数字" />
         @if($errors->has('mobile'))
        <p style="color:red">{{$errors->first('mobile')}}</p>
        @endif
       </div>
      </div>
      <div class="form-group">
       <div class="col-sm-offset-2 col-sm-10">
        <div class="checkbox">
         <label> <input id="inp" type="checkbox" /> 我已阅读并同意遵守 </label>
        </div>
       </div>
      </div>
      <div class="form-group ">
       <div class="col-sm-offset-2 col-sm-10">
        <button type="submit"  disabled="disabled" id="sub"  class="btn btn-success ">注册</button>
       </div>
      </div>

     </form>
    </div>
   </div>
   <div class="col-xs-6 col-md-1"></div>
  </div>
 </body>
  <script type="text/javascript">

       document.getElementById('inp').onclick = function()
       {
           if (document.getElementById('inp').checked == true) {
                document.getElementById('sub').disabled = false;
           } else {
                document.getElementById('sub').disabled = true;
           }
       };

  </script>
</html>
